Sum Of Substrings Codeforces Solution